package org.ccay.core.orm;

import java.util.regex.Matcher;

import org.ccay.core.util.AbstractReplaceCallback;

/**
 * 处理&lt;addFilter &gt;自定义标签Tag的回调函数
 * 
 * @see org.org.ccay.core.orm.ITagHandler
 * 
 * @since 2013-07-16
 */
public class AddFilterCallback extends AbstractReplaceCallback {

	/**
	 * 参数集合
	 */
	private Object parameterObject;
	
	private String addFilterTagHandlerStr = "addFilterTagHandler";

	public AddFilterCallback(Object parameterObject) {
		this.parameterObject = parameterObject;
	}

	/**
	 * 解析自定义标签节点内容, 并调用ITagHander接口处理
	 * 
	 * @param text
	 *            指定的字符串
	 * @param index
	 *            替换的次序
	 * @param matcher
	 *            Matcher对象
	 * @return
	 * @see org.ccay.core.util.AbstractReplaceCallback#doReplace(java.lang.String,
	 *      int, java.util.regex.Matcher)
	 */
	@Override
	public String doReplace(String text, int index, Matcher matcher) {
		return super.doReplaceHandler(text, index, matcher, addFilterTagHandlerStr, parameterObject);
	}

	

}
